﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BaseUI;
using Data;
using BL;
using System.Data;
using IUI;

namespace WebUI
{
    public partial class AdminPage : //System.Web.UI.Page
                                     BaseWebPage<AdminPageController>, IAdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            _admin = new Admin();
            gridSongs.DataSource = Data.Song.AllSongsFromDB;
            gridSongs.DataBind();
         //   gridUsers.
            //gridUsers.DataSource = Data.User.AllUsersFromDB;
            //gridUsers.DataBind();
        }

        protected void gridSongs_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private Admin _admin;

        private EventHandler _page_Shown;

        #region Члены IAdminPage

        public Admin Admin
        {
            get
            {
                return _admin;
            }           
        }

        public EventHandler Page_Shown
        {
            get
            {
                return _page_Shown;
            }
            set
            {
                _page_Shown = value;
            }
        }

        public DataTable Songs
        {
            get
            {
                return (DataTable)gridSongs.DataSource;
            }
            set
            {
                gridSongs.DataSource = value;
                gridSongs.DataBind();
            }
        }

        public DataTable Users
        {
            get
            {
                return (DataTable)gridUsers.DataSource;
            }
            set
            {
                gridUsers.DataSource = value;
                gridUsers.DataBind();
            }
        }

        public EventHandler Click_AddUserButton
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public EventHandler Click_DelUserButton
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public EventHandler Click_SaveSongsButton
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public EventHandler Click_DelSongButton
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion
    }
}
